//
//  TestBasic.h
//  TestMac
//
//  Created by 小星星吃KFC on 2021/6/4.
//



#import <Foundation/Foundation.h>


static void test_basic(void){
    
   /**
    对奇数进行检查(x % 2 == 1)不适用于负数，应使用(x & 1 == 1)或者(x % 2 != 0)
    */
    
    NSLog(@"%d",3%2 == 1);
    NSLog(@"%d",-3%2 == 1);
    NSLog(@"3是偶数=%d",-3%2 == 0);
    NSLog(@"%d",3%2);
    
    NSLog(@"%d",4%2 == 1);
    NSLog(@"%d",-4%2 == 1);
    NSLog(@"4是偶数%d",-4%2 == 0);
    NSLog(@"%d",4%2);
}
